Method and apparatus for improving speed of rasterizing transparent images

ABSTRACT

A method for improving a speed of rasterizing transparent images, comprising determining, from P graphic entity objects on a transparent page, M transparent images and N nontransparent images. Each of the N nontransparent images includes an intersecting area with one of the M transparent images, P is an integer larger than 0, M is an integer larger than 0 and smaller than or equal to P, N is an integer larger than or equal to 0 and smaller than P, and P=M+N. The method also comprises determining a page-level transparent area and a page-level de-transparentizing area of the P graphic entity objects. Contributions of the transparent images and the nontransparent images to the page-level transparent area and the page-level de-transparentizing area are calculated using different methods. The methods further comprises assembling the M transparent images according to the page-level transparent area and the page-level de-transparentizing area.

RELATED APPLICATIONS

This application claims the benefit of priority from Chinese PatentApplication No. 201110460600.2, filed Dec. 31, 2011, the entire contentsof which are incorporated herein by reference.

FIELD

The present disclosure relates to image rasterizing and, moreparticularly, to a method and apparatus for improving a speed ofrasterizing a transparent image.

BACKGROUND

Conventionally, when drawing a graphic entity object, two imaging modelsare usually used: substitute imaging model and transparent imagingmodel.

In the substitute imaging model, a graphic entity object newly drawn ona page completely replaces a background content at the location of thegraphic entity object. That is, a final color of a point at the locationis determined by a last graphic entity object drawn at the location. Inthe transparent imaging model, a transparent graphic entity object newlydrawn on a page and a prior background content at the location of thegraphic entity object are mixed. That is, the final color of a point atthe location is determined by all graphic entity objects drawn at thelocation.

However, in the transparent imaging model, graphic entity objects newlydrawn on a page may first need to be assembled. Since no priordetermination is made on whether each of the graphic entity objectsnewly drawn on the page is a transparent image or a nontransparentimage, calculations need to be performed during the assembling processon all graphic entity objects newly drawn in the page. Therefore, thecalculation is complicated.

Moreover, in the transparent imaging model, transparency calculationneeds to be performed on a graphic entity object newly drawn on a pageand a prior background content at the location of the graphic entityobject. When the resolution of the background content is high, there maybe a large amount of data in the transparency calculation, and thus thecalculation may be complicated, and time consuming.

SUMMARY

In accordance with the present disclosure, there is provided a methodfor improving a speed of rasterizing transparent images, comprisingdetermining, from P graphic entity objects on a transparent page, Mtransparent images and N nontransparent images. Each of the Nnontransparent images includes an intersecting area with one of the Mtransparent images, P is an integer larger than 0, M is an integerlarger than 0 and smaller than or equal to P, N is an integer largerthan or equal to 0 and smaller than P, and P=M+N. The method alsocomprises determining a page-level transparent area and a page-levelde-transparentizing area of the P graphic entity objects. Contributionsof the transparent images and the nontransparent images to thepage-level transparent area and the page-level de-transparentizing areaare calculated using different methods. The method further comprisesassembling the M transparent images according to the page-leveltransparent area and the page-level de-transparentizing area.

Also in accordance with the present disclosure, there is provided anapparatus for improving a speed of rasterizing transparent images,comprising a first determining module configured to determine, from Pgraphic entity objects on a transparent page, M transparent images and Nnontransparent images. Each of the N nontransparent images includes anintersecting area with one of the M transparent images, P is an integerlarger than 0, M is an integer larger than 0 and smaller than or equalto P, N is an integer larger than or equal to 0 and smaller than P, andP=M+N. The apparatus also comprises a second determining moduleconfigured to determine a page-level transparent area and a page-levelde-transparentizing area of the P graphic entity objects. Contributionsof the transparent images and the nontransparent images to thepage-level transparent area and the page-level de-transparentizing areaare calculated using different methods. The apparatus further comprisesan assembling module configured to assemble the M transparent imagesaccording to the page-level transparent area and the page-levelde-transparentizing area.

Features and advantages consistent with the disclosure will be set forthin part in the description which follows, and in part will be obviousfrom the description, or may be learned by practice of the disclosure.Such features and advantages will be realized and attained by means ofthe elements and combinations particularly pointed out in the appendedclaims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory onlyand are not restrictive of the invention, as claimed.

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate several embodiments of theinvention and together with the description, serve to explain theprinciples of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart showing a method for improving the speed ofrasterizing transparent images according to an exemplary embodiment.

FIG. 2 is a flow chart showing a method for assembling graphic entityobjects according to an exemplary embodiment.

FIG. 3 is a flow chart showing a method for assembling a transparentarea of a graphic entity object according to an exemplary embodiment.

FIG. 4 schematically shows six graphic entity objects on a device page.

FIG. 5 illustrates specific contents of five graphic entity objectsobtained sequentially according to an exemplary embodiment.

FIG. 6 schematically shows a page-level transparent area and apage-level de-transparentizing area obtained according embodiments ofthe present disclosure.

FIG. 7 is a schematic diagram showing an apparatus for improving thespeed of rasterizing transparent images according to another exemplaryembodiment.

DESCRIPTION OF THE EMBODIMENTS

Consistent with the present disclosure, a transparent image refers to animage graphic entity with transparency. A nontransparent image refers toa type of graphic entity other than the transparent image.

Consistent with the present disclosure, a transparent area refers to anarea in which a graphic entity is to be assembled according to atransparent model. A de-transparentizing area refers to an area in whicha graphic entity to be subjected to a de-transparentizing calculationand then assembled according to the substitute model. The transparentarea and the de-transparentizing area may be at a page level or at agraphic entity level.

Consistent with the present disclosure, in a physical space, apage-level de-transparentizing area may be equivalent to an area of theset of transparent images that does not intersect with other graphicentity. A page-level transparent area may be an area in the originaltransparent area that does not belong to the de-transparentizing area.

The page-level transparent area and the page-level de-transparentizingarea are an overall statistic. In the physical space, the page-leveltransparent area and the page-level de-transparentizing area may belarger than or equal to the union of the graphic-entity-leveltransparent area and the graphic-entity-level de-transparentizing areaof individual transparent images.

Consistent with the present disclosure, the graphic-entity-leveltransparent area and the graphic-entity-level de-transparentizing areamay refer to a transparent area and a de-transparentizing area,respectively, of a transparent image. A drawing area of a single graphicentity, i.e., a single transparent image, is divided into two parts: agraphic-entity-level transparent area and a graphic-entity-levelde-transparentizing area.

Hereinafter, embodiments consistent with the disclosure will bedescribed with reference to drawings. Wherever possible, the samereference numbers will be used throughout the drawings to refer to thesame or like parts.

FIG. 1 shows a method for improving the speed of rasterizing transparentimages consistent with embodiments of the present disclosure. In someembodiments, application of the methods consistent with the presentdisclosure to a transparent page including W graphic entity objects isdescribed. Among the W graphic entity objects, P graphic entity objectsare transparent images or nontransparent images intersecting with one ormore of the transparent images, while the rest S (i.e., W=P+S) graphicentity objects are nontransparent images that do not intersect with anyof the transparent images, where W is an integer larger than or equal to1, P is an integer larger than 0 and smaller than or equal to W, and Sis an integer larger than or equal to 0 and smaller than W.

As shown in FIG. 1, at S101, the P graphic entity objects aresequentially checked. Among the P graphic entity objects, M graphicentity objects are determined to be transparent images and N graphicentity objects are determined to be nontransparent images that intersectwith one or more of the M graphic entity objects. P=M+N, where M is aninteger larger than 0 and smaller than or equal to P, and N is aninteger larger than or equal to 0 and smaller than P.

At S102, a page-level transparent area and a page-levelde-transparentizing area of the P graphic entity objects are determinedby sequentially adding the contribution of each of the P graphic entityobjects. When determining the contribution of the transparent images andthe nontransparent images to the page-level transparent area and thepage-level de-transparentizing areas, different methods may be used, asdescribed below.

In some embodiments, before the page-level transparent area and thepage-level de-transparentizing area of the P graphic entity objects aredetermined, a coverage area of each of the P graphic entity objects maybe determined.

As indicated above, the page-level transparent area and the page-levelde-transparentizing area are determined by sequentially adding thecontribution of each of the 1st through the P-th graphic entity object.When an m-th graphic entity object, which is a transparent image, isconsidered, the page-level transparent area is calculated according toformula At_(m)=At_(m−1)+Ac_(m)∩Adt_(m−1), where 1≦m≦P. In this formula,At_(m) represents a page-level transparent area formed after the m-thgraphic entity object is determined sequentially among the P graphicentity objects. When m=P, At_(m) represents the page-level transparentarea of the P graphic entity objects. Similarly, At_(m−1) represents apage-level transparent area formed after the (m−1)-th graphic entityobject is determined sequentially among the P graphic entity objects,and Adt_(m−1) represents a page-level de-transparentizing area formedafter the (m−1)-th graphic entity object (which may be a transparentimage or a nontransparent image) is determined sequentially among the Pgraphic entity objects. When m=1, i.e., when calculating thecontribution of the 1st graphic entity object (here assuming the 1stgraphic entity object is a transparent image), both At_(m−1) andAdt_(m−1) are zero. Ac_(m) represents a coverage area of the m-thgraphic entity object.

Similarly, the page-level de-transparentizing area is calculatedaccording to formulaAdt_(m)=Adt_(m−1)+Ac_(m)−(Adt_(m−1)∩Ac_(m))−(At_(m−1)∩Ac_(m)), whereAdt_(m) represents a page-level de-transparentizing area formed afterthe m-th graphic entity object is determined sequentially among the Pgraphic entity objects. Other symbols similar to those in the formulafor calculating the transparent area represent similar variables.

Consistent with embodiments of the present disclosure, when an n-thgraphic entity object, which is a nontransparent image, is considered,the page-level transparent area is calculated according to formula ofAt_(n)=At_(n−1)+Ac_(n), where 1≦n≦P. In this formula, At_(n) representsa page-level transparent area formed after the n-th graphic entityobject is determined sequentially among the P graphic entity objects.When n=P, At_(n) represents the final page-level transparent area of theP graphic entity objects. Similarly, At_(n−1) represents a page-leveltransparent area formed after the (n−1)-th graphic entity object (whichmay be a transparent image or a nontransparent image) is determinedsequentially among the P graphic entity objects. When n=1, i.e., whencalculating the contribution of the 1st graphic entity object (hereassuming the 1st graphic entity object is a nontransparent image),At_(n−1) is zero. Ac_(n) represents a coverage area of the n-th graphicentity object.

Similarly, the page-level de-transparentizing area is calculatedaccording to formula Adt_(n)=Adt_(n−1)−(Adt_(n−1)∩Ac_(n)), where Adt_(n)represents a page-level de-transparentizing area formed after the n-thgraphic entity object is determined sequentially among the P graphicentity objects, and Adt_(n−1) represents a page-levelde-transparentizing area formed after the (n−1)-th graphic entity objectobjects (which may be a transparent image or a nontransparent image) isdetermined sequentially among the P graphic entity. When n=1, i.e., whencalculating the contribution of the 1st graphic entity object (hereassuming the 1st graphic entity object is a nontransparent image),At_(n−1) is zero.

At S103, the M graphic entity objects, which are transparent images, areassembled according to the page-level transparent area and thepage-level de-transparentizing area of the P graphic entity objects.

Consistent with embodiments of the present disclosure, resolutions ofthe M graphic entity objects are compared with a resolution of a devicepage. If the resolution of a graphic entity object is lower than theresolution of the device page, the graphic-entity-level transparent areaand the graphic-entity-level de-transparentizing area of the graphicentity object may be processed differently.

FIG. 2 shows a process for assembling the M graphic entity objectsconsistent with embodiments of the present disclosure.

At S201, the resolutions of the M graphic entity objects are comparedwith the resolution of the device page.

If at least one graphic entity object has a resolution lower than theresolution of the device page, at S202, an intersection of the at leastone graphic entity object with the page-level de-transparentizing areaof the P graphic entity objects is determined, to obtain agraphic-entity-level de-transparentizing area of the at least onegraphic entity object.

At S203, transparency calculation is performed on color values of thegraphic-entity-level de-transparentizing area and color values of abackground graphic entity object to obtain a first calculation result.

At S204, the first calculation result is magnified to the resolution ofthe device page and the magnified first calculation result is drawnaccording to the page-level de-transparentizing area.

FIG. 3 shows a process for assembling the transparent areas of the Mgraphic entity objects.

At S301, an intersection of the at least one graphic entity object,which has a resolution lower than the resolution of the device page, andthe page-level transparent area of the P graphic entity objects isdetermined, to obtain a graphic-entity-level transparent area of the atleast one graphic entity object.

At S302, the graphic-entity-level transparent area is magnified to theresolution of the device page.

At S303, transparency calculation is performed on color values of themagnified graphic-entity-level transparent area and the color values ofthe background graphic entity object to obtain a second calculationresult. The second calculation result is drawn according to thepage-level transparent area.

If the resolution of a graphic entity object of the M graphic entityobjects is higher than the resolution of the device page, such a graphicentity object is scaled to the resolution of the device page.Transparency calculation is performed on color values of the scaledgraphic entity object and the color values of the background graphicentity object. A third calculation result is obtained and drawn.

FIGS. 4-6 schematically illustrate an exemplary process consistent withembodiments of the present disclosure.

Referring to FIG. 4, six graphic entity objects are shown, which arelabeled a, b, c, d, e, and f, respectively. Among these graphic entityobjects, graphic entity objects a, c, d, and e are transparent images,and graphic entity objects b and f are nontransparent images. Inaddition, the graphic entity object b has an overlapping area with thegraphic entity object c, and the graphic entity object d has anoverlapping area with the graphic entity object e. The graphic entityobject f is a nontransparent image not overlapping with any othergraphic entity object, that is, it will not be processed. Thetransparent images and the nontransparent images having an overlappingarea with the transparent images will be processed sequentially.Therefore, as shown in FIG. 5, contents of the five graphic entityobjects obtained sequentially are provided in the device page.

The graphic entity object a is the 1st graphic entity object and is atransparent image. Therefore, the page-level transparent area after thegraphic entity object a is processed is calculated as follows:At ₁ =At ₀ +Ac ₁ ∩Adt ₀=Null+Aa∩Null=Null

At₁ represents a page-level transparent area after the 1st graphicentity object, i.e., the graphic entity object a, is determinedsequentially from the five graphic entity objects. Since the graphicentity object a is the 1st graphic entity object, At₀ is Null. Adt₀represents a page-level de-transparentizing area before the 1st graphicentity object, i.e., the graphic entity object a, is determined.Therefore, Adt₀ is also Null. Ac_(t) is the coverage area of the graphicentity object a, which is Aa.

The result of the above calculation is Null, indicating that nopage-level transparent area is formed after the 1st graphic entityobject, i.e., the graphic entity object a, is determined sequentiallyfrom the five graphic entity objects.

The page-level de-transparentizing area after the graphic entity objecta is processed is calculated as follows:Adt ₁ =Adt ₀ +Ac ₁−(Adt ₀ ∩Ac ₁)−(At ₀ ∩Ac₁)=Null+Aa−(Null∩Aa)−(Null∩Aa)=Aa

That is, the page-level de-transparentizing area formed after the 1stgraphic entity object, i.e., the graphic entity object a, is determinedsequentially from the five graphic entity objects, is Aa.

The graphic entity object b is the 2nd graphic entity object and is anontransparent image. The page-level transparent area after the graphicentity object b is processed is calculated as follows:At ₂ =At ₁ +Ac ₂=Null+Ab=Ab

Ac₂ is a coverage area of the graphic entity object b, which is Ab. Thecalculation result indicates that the page-level transparent area formedafter the 2nd graphic entity object, i.e., the graphic entity object b,is determined sequentially from the five graphic entity objects, is Ab.

The page-level de-transparentizing area after the graphic entity objectb is processed is calculated as follows:Adt ₂ =Adt ₁−(Adt ₁ ∩Ac ₂)=Aa−(Aa∩Ab)=Aa

The calculation result indicates that the page-level de-transparentizingarea formed after the 2nd graphic entity object, i.e., the graphicentity object b, is determined sequentially from the five graphic entityobjects, is Aa.

The graphic entity object c is the 3rd graphic entity object and is thesecond transparent image. The page-level transparent area after thegraphic entity object c is processed is calculated as follows:At ₃ =At ₂ +Ac ₃ ∩Adt ₂ =Ab+Ac∩Aa=Ab

At₂ represents a page-level transparent area formed after the 2ndgraphic entity object, i.e., the graphic entity object b, is determinedsequentially from the five graphic entity objects, and Adt₂ represents apage-level de-transparentizing area formed after the 2nd graphic entityobject, i.e., the graphic entity object b, is determined sequentiallyfrom the five graphic entity objects. Ac₃ is a coverage area of thegraphic entity object c, which is Ac.

The calculation result indicates that the page-level transparent areaformed after the 3rd graphic entity object, i.e., the graphic entityobject c, is determined sequentially from the five graphic entityobjects, is Ab.

The page-level de-transparentizing area after the graphic entity objectc is processed is calculated as follows:

Adt₃ = Adt₂ + Ac₃ − (Adt₂⋂Ac₃) − (At₂⋂Ac₃) = Aa + Ac − (Aa⋂Ac) − (Ab⋂Ac) = Aa + Ac − (Ab⋂Ac)

The calculation result indicates that the page-level de-transparentizingarea formed after the 3rd graphic entity object, i.e., the graphicentity object c, is determined sequentially from the five graphic entityobjects, is Aa+Ac−(Ab∩Ac).

The graphic entity object d is the 4th graphic entity object and is thethird transparent image. The page-level transparent area after thegraphic entity object d is processed is calculated as follows:At ₄ =At ₃ +Ac ₄ ∩Adt ₃ =Ab+Ad∩(Aa+Ac−(Ab∩Ac))=Ab

Ata represents a page-level transparent area formed after the 3rdgraphic entity object, i.e., the graphic entity object c, is determinedsequentially from the five graphic entity objects, and Adt₃ represents apage-level de-transparentizing area formed after the 3rd graphic entityobject, i.e., the graphic entity object c, is determined sequentiallyfrom the five graphic entity objects. Ac₄ is a coverage area of thegraphic entity object d, which is Ad.

The calculation result indicates that the page-level transparent areaformed after the 4th graphic entity object, i.e., the graphic entityobject d, is determined sequentially from the five graphic entityobjects, is Ab.

The page-level de-transparentizing area after the graphic entity objectd is processed is calculated as follows:Adt ₄ =Adt ₃ +Ac ₄−(Adt ₃ ∩Ac ₄)−(At ₃ ∩Ac₄)=Aa+Ac−(Ab∩Ac)+Ad−(Aa+Ac−(Ab∩Ac)∩Ad)−(Ab∩Ad)=Aa+Ac+Ad−(Ab∩Ac)

The calculation result indicates that the page-level de-transparentizingarea formed after the 4th graphic entity object, i.e., the graphicentity object d, is determined sequentially from the five graphic entityobjects, is Aa+Ac+Ad−(Ab∩Ac).

The graphic entity object e is the 5th graphic entity object and is thefourth transparent image. The page-level transparent area after thegraphic entity e is processed is calculated as follows:At ₅ =At ₄ +Ac ₅ ∩Adt ₄ =Ab+Ae∩(Aa+Ac+Ad−(Ab∩Ac))=Ab+Ae∩Ad

At₄ represents a page-level transparent area formed after the 4thgraphic entity object, i.e., the graphic entity object d, is determinedsequentially from the five graphic entity objects, and Adt₄ represents apage-level de-transparentizing area formed after the 4th graphic entityobject, i.e., the graphic entity object d, is determined sequentiallyfrom the five graphic entity objects. Ac₅ is a coverage area of thegraphic entity object e, which is Ae.

The calculation result indicates that the page-level transparent areaformed after the 5th graphic entity object, i.e., the graphic entityobject e, is determined sequentially from the five graphic entityobjects, is Ab+Ae∩Ad.

The page-level de-transparentizing area after the graphic entity objecte is processed is calculated as follows:Adt ₅ =Adt ₄ +Ac ₅−(Adt ₄ ∩Ac ₅)−(At ₄ ∩Ac₅)=Aa+Ac+Ad−(Ab∩Ac)+Ae−(Aa+Ac+Ad−(Ab∩Ac)∩Ae)−(Ab∩Ae)=Aa+Ac+Ad+Ae−(Ab∩Ac)−(Ad∩Ae)

The calculation result indicates that the page-level de-transparentizingarea formed after the 5th graphic entity object, i.e., the graphicentity object e, is determined sequentially from the five graphic entityobjects, is Aa+Ac+Ad+Ae−(Ab∩Ac)−(Ad∩Ae).

After the page-level transparent area and the page-levelde-transparentizing area formed after the five graphic entity objectsare processed are calculated, the transparent images can be assembledrespectively using the page-level transparent area and the page-levelde-transparentizing area.

The graphic entity object a is a transparent image. Assume the graphicentity object a has a resolution of 150*150, which is lower than theresolution of the device page. Since the graphic-entity-leveltransparent area of the graphic entity a is Null, no calculation isperformed on the graphic-entity-level transparent area of the graphicentity a.

The graphic entity object a has an intersection Aa with the page-levelde-transparentizing area of the five graphic entity objects, whichindicates that the graphic-entity-level de-transparentizing area of thegraphic entity object a is Aa, occupying 1/1 of the coverage area of thegraphic entity object a. Transparency calculation is performed on thecolor values of the graphic-entity-level de-transparentizing area of thegraphic entity object a and the color values of the device page. Thecalculation result is magnified to the resolution of the device page anddrawn.

The amount of calculation can be reduced by drawing after thetransparency calculation is performed on the graphic entity object a ascompared to drawing directly without transparency calculation. Theoptimization factor of the transparency calculation on the graphicentity object a may be calculated as follows:(600*600)/(150*150)=16

For the graphic entity object b, since it is a nontransparent image, adifferent method may be used for calculation and drawing.

The graphic entity object c is a transparent image. Assume the graphicentity object c has a resolution of 252*164, which is lower than theresolution of the device page.

The graphic entity object c has an intersection Ac−(Ab∩Ac) with thepage-level de-transparentizing area of the five graphic entity objects,which indicates that a graphic-entity-level de-transparentizing area ofthe graphic entity object c is Ac−(Ab∩Ac) (assume this occupies 29/30 ofthe coverage area of the graphic entity object c). Transparencycalculation is performed on the color values of the graphic-entity-levelde-transparentizing area of the graphic entity object c and the colorvalues of the device page. The calculation result is magnified to theresolution of the device page and drawn.

Similarly, the graphic entity object c has an intersection Ab∩Ac withthe page-level transparent area of the five graphic entity objects,which indicates that a graphic-entity-level transparent area of thegraphic entity object c is Ab∩Ac, occupying 1/30 of the coverage area ofthe graphic entity object c. The graphic-entity-level transparent areaof the graphic entity object c is magnified to the resolution of thedevice page, and transparency calculation is performed on the colorvalues of the magnified graphic-entity-level transparent area of thegraphic entity object c and the color values of the background graphicentity object. The calculation result is drawn.

The optimization factor of the transparency calculation on the graphicentity object c may be calculated as follows:(600*600)/(252*264*29/30+600*600*1/30)=4.7

The graphic entity object d is a transparent image. Assuming the graphicentity object has a resolution of 752*1064, which is higher than theresolution of the device page.

The graphic entity object d is scaled to the resolution of the devicepage. Transparency calculation is performed on the color values of thescaled graphic entity object d and the color values of the backgroundgraphic entity object, and the calculation result is drawn.

The optimization factor of the transparency calculation on the graphicentity object d may be calculated as follows:(600*600)/(600*600)=1

The graphic entity object e may be assembled similar to the graphicentity object c, and thus a description thereof is omitted.

FIG. 6 schematically shows the page-level transparent area and thepage-level de-transparentizing area formed after the five graphic entityobjects are processed.

As can be seen from the above example, the larger the difference betweenthe resolution of a background content and the resolution of atransparent image is, the higher the optimization factor may be, andconsequently the better the optimization effect may be.

FIG. 7 schematically shows an apparatus for improving the speed ofrasterizing transparent images consistent with embodiments of thepresent disclosure. In some embodiments, the apparatus consistent withthe present disclosure may be applied to a transparent page including Wgraphic entity objects. Among the W graphic entity objects, P graphicentity objects are transparent images or nontransparent images thatintersecting with one or more of the transparent images, while the restS (i.e., W=P+S) graphic entity objects are nontransparent images that donot intersect with any of the transparent images, where W is an integerlarger than or equal to 1, P is an integer larger than 0 and smallerthan or equal to W, and S is an integer larger than or equal to 0 andsmaller than W.

The apparatus comprises a first determining module 701 configured tocheck the P graphic entity objects sequentially and to determine, amongthe P graphic entity objects, M graphic entity objects that aretransparent images and N graphic entity objects that are nontransparentimages and include an intersecting area with the M graphic entityobjects, where P=M+N, M represents an integer larger than 0 and smallerthan or equal to P, and N represents an integer larger than or equal to0 and smaller than P.

As shown in FIG. 7, the apparatus also comprises a second determiningmodule 702 configured to determine a page-level transparent area of theP graphic entity objects and a page-level de-transparentizing area ofthe P graphic entity objects. When determining the contribution of thetransparent images and the nontransparent images to the page-leveltransparent area and the page-level de-transparentizing area, differentmethods may be used.

The apparatus shown in FIG. 7 further comprises an assembling module 703configured to assemble the M graphic entity objects according to thepage-level transparent area and the page-level de-transparentizing areaof the P graphic entity objects.

Methods and systems consistent with embodiments of the presentdisclosure may have following technical effects.

First, a transparent image is divided into areas and calculation isperformed on the areas, and different operations are performed ontransparent images and nontransparent images. Therefore, the amount ofcalculation is reduced.

Second, a transparent image is divided into areas and differentoperations are performed on the different areas. Therefore, the amountof calculation on the transparent image is reduced, and the time spentis shortened.

Third, a transparent image is divided into areas and differentoperations are performed on the different areas. Therefore, the largerthe difference between the resolution of a background content and theresolution of the transparent image is, the lower the amount calculationmay be.

Consistent with embodiments of the present disclosure, a computer isprovided which is able to carry out the methods for adjusting spacingbetween characters. The computer may be, for example, a personalcomputer, a workstation, a parallel computer, or a super computer. Thecomputer may comprise one or more input devices, such as a keyboard, amouse, or a control panel, for receiving user instructions or user-setparameters. The computer may also comprise one or more output devices,such as a display or a printer. The display may be used to display thedrawn image.

Consistent with embodiments of the present disclosure, one or morenon-transitory storage medium storing a computer program are provided toimplement the system and method for improving speed of rasterizingtransparent images. The one or more non-transitory storage medium may beinstalled in a computer or provided separately from a computer. Acomputer may include one or more processors coupled to the storagemedium that read the computer program from the storage medium andexecute the program to perform the methods consistent with embodimentsof the present disclosure. The storage medium may be a magnetic storagemedium, such as hard disk, floppy disk, or other magnetic disks, a tape,or a cassette tape. The storage medium may also be an optical storagemedium, such as optical disk (for example, CD or DVD). The storagemedium may further be a semiconductor storage medium, such as DRAM,SRAM, EPROM, EEPROM, flash memory, or memory stick.

Other embodiments of the disclosure will be apparent to those skilled inthe art from consideration of the specification and practice of theinvention disclosed herein. It is intended that the specification andexamples be considered as exemplary only, with a true scope and spiritof the invention being indicated by the following claims.

What is claimed is:
 1. A method for improving a speed of rasterizingtransparent images, comprising: determining, from P graphic entityobjects on a transparent page, M transparent images and N nontransparentimages, each of the N nontransparent images including an intersectingarea with one of the M transparent images, P being an integer largerthan 0, M being an integer larger than 0 and smaller than or equal to P,N being an integer larger than or equal to 0 and smaller than P, andP=M+N; determining a page-level transparent area and a page-levelde-transparentizing area of the P graphic entity objects, contributionsof the transparent images and the nontransparent images to thepage-level transparent area and the page-level de-transparentizing areabeing calculated using different methods; and assembling the Mtransparent images according to the page-level transparent area and thepage-level de-transparentizing area, wherein the assembling the Mtransparent images comprises: comparing a resolution of each of the Mtransparent images with a resolution of a device page; and for alow-resolution graphic entity object having a resolution lower than theresolution of the device page: determining an intersection of thelow-resolution graphic entity object with the page-levelde-transparentizing area, and obtaining a graphic-entity-levelde-transparentizing area of the low-resolution graphic entity object,performing transparency calculation on a color value of thegraphic-entity-level de-transparentizing area and a color value of abackground graphic entity object to obtain a first calculation result,and magnifying the first calculation result to the resolution of thedevice page and drawing the magnified first calculation result accordingto the page-level de-transparentizing area.
 2. The method of claim 1,further comprising: determining, before the determining the page-leveltransparent area and the page-level de-transparentizing area, a coveragearea of each of the P graphic entity objects.
 3. The method of claim 2,wherein: a formula At_(m)=At_(m−1)+Ac_(m)∩Adt_(m−1) is used to calculatethe page-level transparent area when a contribution of an m-th graphicentity object of the P graphic entity objects, which is a transparentimage, is considered, 1≦m≦P, At_(m) is a page-level transparent areaformed after the m-th graphic entity object is determined sequentiallyamong the P graphic entity objects, At_(m−1) is a page-level transparentarea formed after an (m−1)-th graphic entity object is determinedsequentially among the P graphic entity objects, Adt_(m−1) is apage-level de-transparentizing area formed after the (m−1)-th graphicentity object is determined sequentially among the P graphic entityobjects, and Ac_(m) is the coverage area of the m-th graphic entityobject.
 4. The method of claim 2, wherein: a formulaAdt_(m)=Adt_(m−1)+Ac_(m)−(Adt_(m−1)∩Ac_(m))−(At_(m−1)∩Ac_(m)) is used tocalculate the page-level de-transparentizing area when a contribution ofan m-th graphic entity object of the P graphic entity objects, which isa transparent image, is considered, 1≦m≦P, Adt_(m) is a page-levelde-transparentizing area formed after the m-th graphic entity object isdetermined sequentially among the P graphic entity objects, Adt_(m−1) isa page-level de-transparentizing area formed after an (m−1)-th graphicentity object is determined sequentially among the P graphic entityobjects, At_(m−1) is a page-level transparent area formed after the(m−1)-th graphic entity object is determined sequentially among the Pgraphic entity objects, and Ac_(m) is the coverage area of the m-thgraphic entity object.
 5. The method of claim 2, wherein: a formulaAt_(n)=At_(n−1)+Ac_(n) is used to calculate the page-level transparentarea when a contribution of an n-th graphic entity object of the Pgraphic entity objects, which is a nontransparent image, is considered,1≦n≦P, At_(n) is a page-level transparent area formed after the n-thgraphic entity object is determined sequentially among the P graphicentity objects, At_(n−1) is a page-level transparent area formed afteran (n−1)-th graphic entity object is determined sequentially among the Pgraphic entity objects, and Ac_(n) is the coverage area of the n-thgraphic entity object.
 6. The method of claim 2, wherein: a formulaAdt_(n)=Adt_(n−1)−(Adt_(n−1)∩Ac_(n)) is used to calculate the page-levelde-transparentizing area when a contribution of an n-th graphic entityobject of the P graphic entity objects, which is a nontransparent image,is considered, 1≦n≦P, Adt_(n) is a page-level de-transparentizing areaformed after the n-th graphic entity object is determined sequentiallyamong the P graphic entity objects, Adt_(n−1) is a page-levelde-transparentizing area formed after an (n−1)-th graphic entity objectis determined sequentially among the P graphic entity objects, andAc_(n) is the coverage area of the n-th graphic entity object.
 7. Themethod of claim 1, wherein the assembling the M transparent imagesfurther comprises: for the low-resolution graphic entity object:determining an intersection of the low-resolution graphic entity objectwith the page-level transparent area, and obtaining agraphic-entity-level transparent area of the low-resolution graphicentity object, magnifying the graphic-entity-level transparent area tothe resolution of the device page, and performing transparencycalculation on a color value of the magnified graphic-entity-leveltransparent area and the color value of the background graphic entityobject to obtain a second calculation result and drawing the secondcalculation result according to the page-level transparent area of thetransparent image.
 8. The method of claim 1, wherein the assembling theM transparent images further comprises: for a high-resolution graphicentity object having a resolution higher than the resolution of thedevice page: scaling the high-resolution graphic entity object to theresolution of the device page, performing transparency calculation on acolor value of the scaled high-resolution graphic entity object and acolor value of the background graphic entity object to obtain a thirdcalculation result, and drawing the third calculation result.
 9. Anon-transitory computer-readable storage medium with an executableprogram stored thereon, wherein the program, when executed by at leastone processor, causes a computing device to perform operationscomprising: determining, from P graphic entity objects on a transparentpage, M transparent images and N nontransparent images, each of the Nnontransparent images including an intersecting area with one of the Mtransparent images, P being an integer larger than 0, M being an integerlarger than 0 and smaller than or equal to P, N being an integer largerthan or equal to 0 and smaller than P, and P=M+N; determining apage-level transparent area and a page-level de-transparentizing area ofthe P graphic entity objects, contributions of the transparent imagesand the nontransparent images to the page-level transparent area and thepage-level de-transparentizing area being calculated using differentmethods; and assembling the M transparent images according to thepage-level transparent area and the page-level de-transparentizing area,wherein the assembling the M transparent images comprises: comparing aresolution of each of the M transparent images with a resolution of adevice page; and for a low-resolution graphic entity object having aresolution lower than the resolution of the device page: determining anintersection of the low-resolution graphic entity object with thepage-level de-transparentizing area, and obtaining agraphic-entity-level de-transparentizing area of the low-resolutiongraphic entity object, performing transparency calculation on a colorvalue of the graphic-entity-level de-transparentizing area and a colorvalue of a background graphic entity object to obtain a firstcalculation result, and magnifying the first calculation result to theresolution of the device page and drawing the magnified firstcalculation result according to the page-level de-transparentizing area.